Clarify scipy linprog transformation description#742
Conversation
Clarifies that SciPy transforms the problem into standard form internally after presolve.
✅ Deploy Preview for taupe-gaufre-c4e660 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Many thanks @Zhengyizhe0209-arch! It's a nice PR. I think the wording should be a bit more specific because the lecture calls In SciPy, Because of this, I would avoid saying that SciPy necessarily converts the problem to standard form by adding slack variables before solving, since that description is mainly tied to the legacy I think this is also the point that is being raised in #599. A simpler replacement could be:
Another small comment: you noted that this PR addresses #599, but it only tackles the first part of the issue. It would be nice to address the entire issue in one PR or explicitly state that it addresses the first or second part of the issue to avoid closing it without fully resolving it. |
|
Many thanks for the detailed explanation and suggestions! That makes sense. I agree that my current wording is too broad, especially since I will revise the paragraph to avoid implying that SciPy always converts the problem to standard form by adding slack variables before solving. I will use the simpler wording you suggested, focusing on the accepted constraint forms, the default I will also update the PR description to say that it addresses the first part of #599 rather than the whole issue. Thanks again for the helpful review! |
Clarifies the description of SciPy's default highs method and the returned slack values.
- Fix OR-Tools prose: x3 (bank) and x5 (bond) values were swapped in the investment strategy description. - Remove incorrect note claiming OR-Tools and SciPy give different solutions — the solution is unique. - Fix math error in slack variable transformation: RHS should be b_i, not 0. - Fix wrong comment: A_ex2/b_ex2 are equality constraints, not inequality. - Fix prose: iso-revenue lines show product combinations, not materials/labor; clarify firm's objective sentence. - Fix prose: "creates two variables" → correct for 5-variable example. - Fix grammar: "keep invest" → "keep investing", "it's" → "its", "where in" → "where". - Add missing x, y >= 0 constraint in Exercise 2 formulation. Addresses second part of QuantEcon#599. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Thanks for the PR @Zhengyizhe0209-arch — nice work on the first part. I pushed a follow-up commit that addresses the second part of #599 (the OR-Tools prose had x3/x5 values swapped) and fixes several other issues I noticed while reviewing the lecture:
This should fully close #599. |
Addresses the first part of #599.
This PR makes the description of
scipy.optimize.linprogmore precise by noting that SciPy transforms the problem into standard form internally after presolve.